package net.sf.rose.business.action;

import javax.servlet.http.HttpServletRequest;

import net.sf.rose.jdbc.service.Service;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author fengjian
 * @since 2013/05/16
 */
@Controller
public class MainController {

	/**
	 * 登录
	 */
	@RequestMapping("/index.html")
	public ModelAndView index(HttpServletRequest request,Service service) {
		System.out.println("test");
		System.out.println(service);
		//throw new RuntimeException("test");
		ModelAndView mav = new ModelAndView("index");
		return mav;
	}

	/**
	 * 登录
	 */
	@RequestMapping("/failure.html")
	public ModelAndView failure(HttpServletRequest request) {
		ModelAndView mav = new ModelAndView("failure");
		return mav;
	}
	
	@RequestMapping("/main.html")
	public ModelAndView main(HttpServletRequest request) {
		ModelAndView mav = new ModelAndView("main");
		return mav;
	}
}
